package com.example.mycamera;

import android.app.Activity;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.widget.Button;
public class MainActivity extends Activity implements android.view.View.OnClickListener{
    Button button1,button2;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        initView();
    }


    private void initView() {
		// TODO Auto-generated method stub
		button1=(Button) findViewById(R.id.button);
		button2=(Button) findViewById(R.id.button1);
		button1.setOnClickListener(this);
		button2.setOnClickListener(this);
	}


	@Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.main, menu);
        return true;
    }


	@Override
	public void onClick(View v) {
		// TODO Auto-generated method stub
		switch (v.getId()) {
		case R.id.button:
			Intent in=new Intent(MainActivity.this,CommonCamera.class);
			startActivity(in);
			break;
		case R.id.button1:
			Intent intent=new Intent(MainActivity.this,SurFaceCamera.class);
			startActivity(intent);
			break;
		default:
			break;
		}
	}
    
}
